// types/element-plus.ts
export const ElementButtonTypes = [
  "",
  "primary",
  "success",
  "danger",
  "warning",
  "text",
  "default",
  "info",
] as const;
export type ElementButtonType = (typeof ElementButtonTypes)[number];

// 常量
export const MAX_PDF_FILE = 20;

export enum MergeStatus {
  /** 开始合并（初始状态） */
  Started = 0,
  /** 合并进行中 */
  InProgress = 1,
  /** 合并成功 */
  Success = 2,
  /** 合并失败 */
  Failed = 3,
  /** 重新尝试合并 */
  Retrying = 4,
}
//  按钮状态描述映射
export const statusLabels = {
  [MergeStatus.Started]: "开始合并",
  [MergeStatus.InProgress]: "合并中...",
  [MergeStatus.Success]: "合并成功",
  [MergeStatus.Failed]: "合并失败",
  [MergeStatus.Retrying]: "重新合并",
};

// 按钮状态类型映射
export const statusTypeMap: Record<MergeStatus, ElementButtonType> = {
  [MergeStatus.Started]: "primary",
  [MergeStatus.InProgress]: "primary",
  [MergeStatus.Success]: "success",
  [MergeStatus.Failed]: "danger",
  [MergeStatus.Retrying]: "warning",
};
